//
//  profileViewController.h
//  iSeeColor
//
//  Created by narbeh shahnazarian on 12-10-21.
//  Copyright (c) 2012 Wyatt Gosling. All rights reserved.
////

#import <UIKit/UIKit.h>

@class DBRestClient;

/*
 Desciption:  The profileViewController is meant for storing users data on local storage via NSUserDefaults interface.  For the first prototype the user can only save his/her username and password but these will not be purposeful until cloud storage is intgrated into our system.
 */
@interface profileViewController : UIViewController
{
    IBOutlet UITextField *firstNameText;
    IBOutlet UITextField *lastNameText;
    UIViewController* cameraViewController;
	DBRestClient* restClient;
    UIButton* linkButton;

   
}

/*
 Description: the method to save user data to NSUserDefaults container.  Is activated up pressing next in profile menu 1.
 Args: sender - the default argument of type id
 Return: void
 pre: n/a
 post: appropriate saving of user name and last name is preformed.
 */
-(void)save:(id)sender;


- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil;


/*
 Description: Prompt the user for first and last name, then save data.
 Args: the user enters their name into the text fields.
 Return: n/a
 Pre: n/a
 Post:n/a
 */
- (void)viewDidLoad;


- (void)didReceiveMemoryWarning;


/*
 Description: close keyboard on "return"
 Return: IBAction
 Pre: n/a
 Post:n/a
 */
-(IBAction)ReturnKeyButton:(id)sender;


/*
 Description: method to dissmiss the keyboard by touch background.
 Args: touches - a touch action
 event - an trigger event(here it is touching the background)
 Return: n/a
 Pre: the keyboard must be present in the view
 Post:keyboard is dissmissed
 */
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;



/*
 Description: Links or Unlinks user's dropbox account. 
              Name determined by Dropbox api.
 Return: void
 Pre:n/a
 Post: user will be successfully linked to their dropbox account
 */
- (IBAction)didPressLink;

/*
 Description: Informs user on how to setup iCloud.
 Return: void
 Pre: n/a
 Post: n/a
 */
- (IBAction)didPressICloud;

/*
 Description: runs after dropbox authentication has finished
              allowing buttons and nsuserdefaults to be updated
 Return: void
 Pre: n/a
 Post: Dropbox button text will match actually dropbox state.
       User setting "storage location" will match dropbox state.
 */
- (void)updateDropboxState:(NSNotification *) notification;

@property (nonatomic, retain) IBOutlet UIButton *linkButton;
@property (nonatomic, retain) UIViewController *cameraViewController;

@end
